<div ng-controller="printerTemplateAddCtrl">
    <div class="bg-light lter b-b wrapper-md">
        <h4 class="m-n font-thin">打印机小票添加</h4>
        <button onClick="javascript:history.go(-1)" class="btn-back btn btn-dark btn-sm btn-rounded">
            返回
        </button>
    </div>
    <div class="wrapper-md">
        <div class="panel-body panel">
            <div class="bg-light panel-body m-b-sm">
                <p class="h4 font-bold m-b-xs block">小票样式</p>
                <span class="block inline h6">你可以在这里配置打印小票的样式等。配置了打印方案后打印机才会正常出单。（小票数据仅供参考,一切以真实数据为准）</span>
            </div>
            <form name="printerTemplateForm" class="text-center form-validation">
                <div class="inline m-b-xs text-left">
                    <!-- 展示样式 -->
                    <div class="pull-left panel-body w-md b-a b-dashed m-r-sm">
                        <div class="text-center">
                            <h4 class="block">**# 乐鸽餐饮 **</h4>
                            <span class="block">乐鸽餐饮店(万科城)</span>
                        </div>
                        <!-- cancel button -->
                        <div class="line line-dashed b-b b-dark"></div>
                        <div ui-sortable="sortableOptions" ng-model="data">
                            <div class="square-container" ng-class="{true:'square-container-active'}[item.select || item.addStatus]" ng-repeat="item in data track by $index" ng-click="changeModules(item)">
                                <div class="square square-l-t"></div>
                                <div class="square square-r-t"></div>
                                <div class="square square-l-m"></div>
                                <div class="square square-l-b"></div>
                                <div class="square square-r-b"></div>
                                <div class="square square-r-m"></div>
                                <div class="square square-m-t" ng-click="openAddBox(item,$event,0);"><i class="text-white h6">+</i></div>
                                <div class="square square-m-b" ng-click="openAddBox(item,$event,1);"><i class="text-white h6">+</i></div>

                                <!-- cancel button -->
                                <div class="square square-cancel" ng-click="deleteModules(item)"><i class="fa fa-times"></i></div>

                                <!-- content -->
                                <div>
                                    <div ng-bind-html="item.content |trustHtml"></div>
                                </div>

                                <!-- add box -->
                                <div class="tool-box text-left" ng-if="item.addStatus">
                                    <div class="list-group-item no-border bg-none">
                                        <div class="wrapper-md pos-rlt bg-light r r-2x b-a">
                                            <span class="arrow left pull-up arrow-light"></span>
                                            <div class="w-xl">
                                                <div class="block m-b-xs font-bold b-l b-danger b-2x"><p class="m-l-sm block">添加选项</p></div>
                                                <div class="form-horizontal form-validation panel-body">
                                                    <div class="form-group text-left">
                                                        <label class="h6 m-b-sm block">选择模版:</label>
                                                        <div>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,0)">星号下划线</button>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,1)">订单详情</button>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,2)">商品详情</button>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,3)">价格详情</button>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,4)">订单备注</button>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,5)">地址详情</button>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,6)">桌号详情</button>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,7)">配送费用</button>
                                                            <button class="btn btn-sm btn-default m-b-xs" ng-click="addBox(item,8)">餐盒费用</button>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>


                        <div class="text-center">
                            <span class="h6 block m-b-xs">谢谢惠顾,欢迎下次光临</span>
                            <span class="h6 block m-b-xs">乐鸽技术支持</span>
                            <span class="h6 block">400-931-8788</span>
                        </div>
                    </div>

                    <!-- 自定义样式 -->
                    <div class="pull-left bg-light panel-body b-a w-xl">
                        <div class="form-validation">
                            <div class="form-group">
                                <label class="control-label m-b-xs">小票名称</label>
                                <div>
                                    <input type="text" name="name" class="form-control" placeholder="请输入小票样式名称" ng-model="printerTemplateAddVO.name" required>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>

                <div class="text-center">
                    <div class="btn btn-success" ng-click="addPrinterTemplate()" ng-disabled="printerTemplateForm.$invalid">保存</div>
                </div>
            </form>
        </div>
    </div>
</div>